home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / internet / net commander 1.0 / ISP / SCRPTLST / INDYNET.CMD < prev    next >
Encoding:
Text File  |  1996-02-14  |  1.2 KB  |  74 lines

  1. #    Trumpet Winsock Login.cmd for Indy Net
  2. #
  3. #trace on
  4. #
  5. # set up some strings for dialling up
  6. #
  7. if ![load $number]
  8.   if [query $number "Enter your dial up phone number"]
  9.     save $number
  10.   end
  11. end
  12. if ![load $username]
  13.   if [username "Enter your login username"]
  14.     save $username
  15.   end
  16. end
  17. if ![load $password]
  18.   if [password "Enter your login password"]
  19.     save $password
  20.   end
  21. end
  22. $modemsetup = "&f&c0"
  23. $userprompt = "ogin:"
  24. $passprompt = "assword:"
  25. %attempts = 10
  26. #
  27. #
  28. #----------------------------------------------------------
  29. #
  30. # initialize modem
  31. #
  32. set ip = 0.0.0.0
  33. output "atz"\13
  34. if ! [input 10 OK\n]
  35.   display "Modem is not responding"\n
  36.   abort
  37. end
  38. #
  39. # setup our modem commands
  40. #
  41. output "at"$modemsetup\13
  42. input 10 OK\n
  43. #
  44. # send phone number
  45. #
  46. %n = 0
  47. repeat
  48.   if %n = %attempts
  49.     display "Too many dial attempts"\n
  50.     abort
  51.   end
  52.   output "atdt"$number\13
  53.   %ok = [input 60 CONNECT]
  54.   %n = %n + 1
  55. until %ok
  56. input 10 \n
  57. #
  58. #  wait for the username prompt
  59. #
  60. input 30 $userprompt
  61. output $username".ppp"\13
  62. #
  63. # and the password
  64. #
  65. input 30 $passprompt
  66. output $password\13
  67. #
  68. # make sure that we are in slip mode
  69. #
  70. input 30 "~"
  71. #
  72. # now we are finished.
  73. #
  74.